import request from '@/utils/request'

// 查询chat优惠券列表
export function listChatCoupons(query) {
  return request({
    url: '/system/chatCoupons/list',
    method: 'get',
    params: query
  })
}

// 查询chat优惠券详细
export function getChatCoupons(id) {
  return request({
    url: '/system/chatCoupons/' + id,
    method: 'get'
  })
}

// 新增chat优惠券
export function addChatCoupons(data) {
  return request({
    url: '/system/chatCoupons',
    method: 'post',
    data: data
  })
}

// 修改chat优惠券
export function updateChatCoupons(data) {
  return request({
    url: '/system/chatCoupons',
    method: 'put',
    data: data
  })
}

// 删除chat优惠券
export function delChatCoupons(id) {
  return request({
    url: '/system/chatCoupons/' + id,
    method: 'delete'
  })
}
